- content_for :title do
  = @title

- content_for :section_title do
  = @title

- content_for :section_rightpanel do
  a.btn.btn-icon.bg-green href="#{new_admin_user_path}"
    i.far.fa-plus-square
    | 新建用户

.row
  .col-md-12
    .card
      .card-body
        table.table.p-0
          thead
            tr
              th NO
              th 用户昵称
              th 邮箱
              th 权限
              th 状态
              th 最后登录时间
              th 操作
          tbody
            - @users.each_with_index do |user, i|
              tr
                td
                  = i + 1
                td
                  = link_to user.username, edit_admin_user_path(user)
                td
                  = user.email
                td
                  = user.role_name
                td
                  - if user.confirmed_at
                    | 已激活
                  - else
                    = link_to '未激活', edit_admin_user_path(user)
                td
                  - if user.last_sign_in_at
                    = time_ago_in_words(user.last_sign_in_at)
                  - else
                    | 从未登录
                td
                  = link_to '删除', admin_user_path(user), method: :delete, data: { confirm: '你确定？'}
